package monster.flight.admin.manager.service.xtgl;

import java.util.List;
import java.util.Map;


import monster.comm.exception.InvalidParameterException;
import monster.comm.exception.UniqueNeedException;
import monster.flight.admin.vo.xtgl.Dict_And_detailVO;
import monster.flight.comm.entity.vo.Xt_dict;
import monster.flight.comm.entity.vo.Xt_dict_detail;



/**
 * 
* 创建信息=============
* 类名: monster.flight.manager.service.admin.xtgl.DictService
* 类作用描述: 数据字典的相关服务
* 创建人： jzk 
* 创建时间： 2013-1-9 上午12:12:06
* 修改信息1=============
* 修改类型:  2   //1.修改bug 2.业务变化修改
* 修改描述: 
* 修改人：  lzy
* 修改时间：2013-1-15 上午12:12:06
 */
public interface DictService {
	
	/**
	*@Description: 得到所有数据字典及明细
	*@return  
	*@return List     Dict_And_detailVO的list
	*@throws
	 */
	public List<Dict_And_detailVO> getDictAndDetail()throws  Exception;
	/**
	*@author lzy
	*@Description: 根据PO里的过滤条件，得到所有数据字典
	*@param   Dict_And_detailVO 
	*@return List     Dict_And_detailVO的list
	*@throws Exception
	 */
	public List<Xt_dict> selectPage(Map<String,Object> map)throws  Exception;
	/**
	*@author lzy
	*@Description: 添加数据字典
	*@param   Xt_dict 
	*@return void
	*@throws Exception
	 */
	public void insertDict(Xt_dict po)throws Exception;
	/**
	*@author lzy
	*@Description: 根据主键更新数据字典
	*@param   Xt_dict 
	*@return void
	*@throws Exception
	 */
	public void updateDictByKey(Xt_dict po)throws Exception;
	/**
	*@author lzy
	*@Description: 根据主键删除数据字典
	*@param   Xt_dict 
	*@return void
	*@throws Exception
	 */
	public void deteleDictByKey(Xt_dict po)throws  Exception;
	
	/**
	 * 分页使用
	 * @param po
	 * @return
	 * @throws Exception
	 */
	public int getRowCount(Xt_dict po)throws Exception;
	/**
	 * 根据主键得到一条数据
	 * @param key
	 * @return
	 * @throws Exception
	 */
	public Xt_dict getPoByKey(String key)throws Exception;
	
	 /**
	  * @author lzy
	  * @Description:判断数据字典编码是否存在
	  * @param xt_dict
	  * @return true存在 false不存在
	  */
	 public boolean dict_codeExist(String  dict_code,String old_dict_code)throws Exception; 
	 
	 
	 /**
		*@author lzy
		*@Description: 根据DICT_SN查询数据字典明细  Xt_dict_detail.DICT_SN不能为空
		*@param   Xt_dict_detail 
		*@return void
		*@throws Exception
		 */
		public List<Xt_dict_detail> getDictDetailList(Xt_dict_detail po)throws Exception;
		/**
		*@author lzy
		*@Description: 添加数据字典明细
		*@param   Xt_dict_detail 
		*@return void
		*@throws Exception
		 */
		public void insertDictDetail(Xt_dict_detail po)throws Exception; 
		/**
		*@author lzy
		*@Description: 根据主键更新数据字典明细 Xt_dict_detail.DICT_SN不能为空
		*@param   Xt_dict_detail 
		*@return void
		*@throws Exception
		 */
		public void updateDictDetailByKey(Xt_dict_detail po)throws Exception; 
		/**
		*@author lzy
		*@Description: 根据格式码删除数据字典明细 Xt_dict_detail.Fomcat不能为空
		*@param   Xt_dict_detail 
		*@return void
		*@throws Exception
		 */
		public void deleteDictDetailByFomcat(Xt_dict_detail po)throws Exception; 
		/**
		 * 根据外键dict_sn删除数据
		 * @param dict_sn
		 * @throws Exception
		 */
		public void deleteDictDetalByDict_SN(String dict_sn)throws Exception; 
		/**
		*@Description: 根据主键返回po
		*@param id
		*@return Xt_dict_detail
		*@throws Exception
		*/
		 public Xt_dict_detail getPoByID(String option_sn)throws Exception;
		 /**
		  * 校验选项编码唯一性
		  * @param po
		  * @return true唯一  false不唯一
		  * @
		  */
		 public boolean validateOption_idOnly(Xt_dict_detail po)throws Exception;
}
